import random, time

setGlobalDuration(10)

oscReceive(bus='pit', address='/pit', port=9000)
sine(pitch=1, amplitude=.5, pitchVar='pit')

startCsound()

time.sleep(1)

for i in range(100):
    rnd = random.random() # random values between 0 and 1
    pitch = mapper(rnd, 0, 1, 250, 750, True) # mapped between 250 and 750 logarithmically
    sendOscControl(value=pitch, address='/pit', port=9000)
    time.sleep(.1)
    